﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Com.Crc.ResManage.DAL.EquipManage;
using Com.Crc.PoJo.Model.Resource;
using Com.Crc.PoJo.Model.UserBoard;
using System.Data;
using System.Collections;

namespace Com.Crc.ResManage.BLL.EquipManage
{
    public class BroadBandManageExchangeUserBorad
    {
        BroadBandManagerExchangeUserBoradDAL dal = new BroadBandManagerExchangeUserBoradDAL();
        /// <summary>
        /// 新增宽带设备信息
        /// </summary>
        /// <param name="data">model实体</param>
        /// <returns></returns>
        public bool AddExchangeUserBoradData(Com.Crc.PoJo.Model.UserBoard.ExchangeUserBoardEntity data)
        {
            try
            {
                return dal.AddExchangeUserBoardData(data);
            }
            catch (Exception ex)
            {
                string strError = ex.Message.ToString();
                return false;
            }
        }

        /// <summary>
        /// 修改宽带设备信息
        /// </summary>
        /// <param name="data">model实体</param>
        /// <returns></returns>
        public bool UpdateExchangeUserBoradData(Com.Crc.PoJo.Model.UserBoard.ExchangeUserBoardEntity data)
        {
            try
            {
                return dal.UpdateExchangeUserBoardData(data);
            }
            catch (Exception ex)
            {
                string strError = ex.Message.ToString();
                return false;
            }
        }

        /// <summary>
        /// 查询宽带设备信息
        /// </summary>
        /// <param name="strBranchID">分局ID</param>
        /// <param name="strOfficeID">局点ID</param>
        /// <param name="strEquipID">设备ID</param>
        /// <returns></returns>
        public DataTable QueryExchangeUserBoradData(string strBranchID, string strOfficeID, string strEquipID)
        {
            try
            {
                return dal.QueryExchangeUserBoardData(strBranchID, strOfficeID, strEquipID);
            }
            catch (Exception ex)
            {
                string strError = ex.Message.ToString();
                return null;
            }
        }
        /// <summary>
        /// 删除设备，修改状态位
        /// </summary>
        /// <param name="wlanList"></param>
        /// <returns></returns>
        public bool DeleteExchangeUserBoradData(ArrayList wlanList)
        {
            try
            {
                return dal.DeleteExchangeUserBoardData(wlanList);
            }
            catch (Exception ex)
            {
                string strError = ex.Message.ToString();
                return false;
            }
        }
    }
}
